<template>
    <nav-bar>
      <template v-slot:default>购物车</template>
  </nav-bar>
</template>

<script>
import { onMounted, reactive, toRefs } from 'vue'
import { useRouter} from 'vue-router'
import NavBar from '../../components/common/navbar/NavBar.vue'
export default {
  components:{
    NavBar
  },
    setup () {
        const state = reactive({
            count: 0
        })
        const router = useRouter()
        onMounted(() =>{
          if(localStorage.getItem("username") == null){
            router.push('/login')
          }
        })
        return {
            ...toRefs(state)
        }
    }
}
</script>

<style lang="scss" scoped>

</style>